package com.chenss.dragonserapp.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chenss.dragonserapp.R;
import com.chenss.dragonserapp.app.AppManager;
import com.chenss.dragonserapp.base.BaseActivity;
import com.chenss.dragonserapp.utils.ToastUtil;

/**
 * PageName: 系统设置
 * Create by chenss at 2018/4/20 2:54
 */
public class SettingsActivity extends BaseActivity {
LinearLayout ll_left;//左边按钮
    TextView tv_page_title;
    LinearLayout ll_pwd,ll_clear,ll_logout;
    @Override
    public void initParms(Bundle parms) {

    }

    @Override
    public int bindLayout() {
        return R.layout.activity_setting;
    }

    @Override
    public void initView(View view) {
         ll_left=findView(R.id.ll_left);//左边按钮
         tv_page_title=findView(R.id.tv_page_title);
        ll_left.setVisibility(View.VISIBLE);
        ll_left.setOnClickListener(this);
        tv_page_title.setText("系统设置");


        ll_pwd=findView(R.id.ll_pwd);
        ll_clear=findView(R.id.ll_clear);
        ll_logout=findView(R.id.ll_logout);
        ll_pwd.setOnClickListener(this);
        ll_clear.setOnClickListener(this);
        ll_logout.setOnClickListener(this);
    }

    @Override
    public void doBusiness(Context mContext) {

    }

    @Override
    public void widgetClick(View v) {
        switch (v.getId()){
            case R.id.ll_left:
                finish();
                break;
         case R.id.ll_pwd:
             startActivity(UpdatePwdActivity.class);
                break;
         case R.id.ll_clear:
             ToastUtil.showShort(this,"清除成功！");
                break;
         case R.id.ll_logout:
             AppManager.getAppManager().redirectLogin(this,LoginActivity.class);
                break;
        }
    }

}
